<?php

require_once '../config.php';
require_once '../functions.php';


books_get_current_user();

$sentence = book_fetch_all("select * from options");


?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <title>Users &laquo; Admin</title>
  <link rel="stylesheet" href="/static/assets/vendors/bootstrap/css/bootstrap.css">
  <link rel="stylesheet" href="/static/assets/vendors/font-awesome/css/font-awesome.css">
  <link rel="stylesheet" href="/static/assets/vendors/nprogress/nprogress.css">
  <link rel="stylesheet" href="/static/assets/css/admin.css">
  <script src="/static/assets/vendors/nprogress/nprogress.js"></script>
  <style>
      p {
        white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
      }
  </style>
</head>
<body>
  <script>NProgress.start()</script>

  <div class="main">
    <?php include 'inc/navbar_admin.php'; ?>
      <a href="/admin/test1add.php">添加</a>
    <div class="container-fluid">
      <div class="page-title">
        <h1>添加内容</h1>
      </div>
      <!-- 有错误信息时展示 -->
      <!-- <div class="alert alert-danger">
        <strong>错误！</strong>发生XXX错误
      </div> -->
      <div class="row">
        <div class="col-md-12">
          <table class="table table-striped table-bordered table-hover text-nowrap table-layout:fixed">
            <thead>
               <tr>

                <th style="width:200px">描述</th>
                <th>作者简介</th>
                <th>链接</th>
                <th>点赞数</th>
                <th>ISBN</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody style="text-align:center">
            <?php  foreach ($sentence as $list):?>
              <tr>
                <td><p style="width:200px"><?php echo $list['description']?></p> </td>
                <td><p style="width:200px"><?php echo $list['authors']?></p> </td>
                <td><p style="width:200px"><?php echo $list['link']?></p> </td>
                <td><p style="width:200px"><?php echo $list['discussnum']?></p> </td>
                <td><p style="width:200px"><?php echo $list['option_isbn']?></p> </td>
        
                <td class="text-center">
                  <a href="/admin/test1-delete.php?id=<?php echo $list['id']?>" class="btn btn-danger btn-xs">删除</a>
                </td>
              </tr>
            <?php endforeach?>
             
             

            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>

  <?php $current_page = 'book'; ?>
  <?php include 'inc/sidebar.php'; ?>

  <script src="/static/assets/vendors/jquery/jquery.js"></script>
  <script src="/static/assets/vendors/bootstrap/js/bootstrap.js"></script>
  <script>NProgress.done()</script>
</body>
</html>
